﻿using SmartSiteManagementSystem.Models.DTO;
using SmartSiteManagementSystem.Models.Material;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSiteManagementSystem.Models.WorkTask
{
    [Serializable]
    public class SupplyingPlaceInfo
    {
        /// <summary>
        ///供应地Id
        /// </summary>
        private int _supplyingPlaceId;
        /// <summary>
        /// 供应地Id
        /// </summary>
        public int SupplyingPlaceId
        {
            get { return _supplyingPlaceId; }
            set { _supplyingPlaceId = value; }
        }

        /// <summary>
        /// 供应地名字 
        /// </summary>
        private string _supplyingPlaceName;

        /// <summary>
        /// 供应地名字
        /// </summary>
        public string SupplyingPlaceName
        {
            get { return _supplyingPlaceName; }
            set { _supplyingPlaceName = value; }
        }

        /// <summary>
        /// 描述
        /// </summary>
        private string _descript;

        /// <summary>
        /// 描述
        /// </summary>
        public string Descript
        {
            get { return _descript; }
            set { _descript = value; }
        }

        /// <summary>
        /// 供应地 坐标X 
        /// </summary>
        private double _positionX;
        /// <summary>
        /// 供应地  坐标X 
        /// </summary>
        public double PositionX
        {
            get { return _positionX; }
            set { _positionX = value; }
        }


        /// <summary>
        /// 供应地  坐标Y 
        /// </summary>
        private double _positionY;
        /// <summary>
        /// 供应地  坐标Y 
        /// </summary>
        public double PositionY
        {
            get { return _positionY; }
            set { _positionY = value; }
        }


        /// <summary>
        /// 供应地  坐标Z 
        /// </summary>
        private double _positionZ;
        /// <summary>
        /// 供应地  坐标Y 
        /// </summary>
        public double PositionZ
        {
            get { return _positionZ; }
            set { _positionZ = value; }
        }


        /// <summary>
        /// 是否删除 逻辑删  1 删除 0 
        /// </summary>
        private bool _isDelete;

        public bool IsDelete
        {
            get { return _isDelete; }
            set { _isDelete = value; }

        }

        private DateTime _createtime;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime
        {
            set { _createtime = value; }
            get { return _createtime; }
        }

        private DateTime _updatetime;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime
        {
            set { _updatetime = value; }
            get { return _updatetime; }
        }


        #region 虚拟字段
        /// <summary>
        /// 坐标
        /// </summary>
        public PositionInfo Position
        {
            get
            {
                return new PositionInfo(this.SupplyingPlaceId, this.PositionX, this.PositionY, this.PositionZ);
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public string PositionStr
        {
            get
            {
                return "(x:"+this.Position.x.ToString()+" y:"+this.Position.y.ToString() + " z:"+this.Position.z.ToString() + ")";
            }
        }



        /// <summary>
        /// 可供物料集合
        /// </summary>
        public IList<MaterialInfo> CanSupplyMaterialList { get; set; }
        #endregion
    }
}
